package service;

import dao.SubjectsMapper;
import org.springframework.stereotype.Service;
import pojo.Subjects;
import javax.annotation.Resource;
import java.util.List;

@Service
public class SubjectsServiceImpl implements  SubjectsService{

    @Resource
    private SubjectsMapper mapper;


    @Override
    public List<Subjects> getInfo() {
        return mapper.getInfo();
    }

    @Override
    public Subjects getInfobyId(Integer id) {
        return mapper.getInfobyId(id);
    }

    @Override
    public Integer updateLook(Integer id) {
        return mapper.updateLook(id);
    }

    @Override
    public Boolean updateVote(Integer count, Integer id) {
        return mapper.updateVote(count,id)>0;
    }
}
